{% include 'head.html.twig' %}
{% include 'header.html.twig' %}
{% include 'init.twig' %}
{% import 'media.html.twig' as media %}
{% set q = question[question_num] %}


{% set r_rationale = rationales %}
{% set l_rationale = rationales2 %}
{% set r_answer = q['answer']%}
{% set l_answer = other%}

{% if swap %}
{%    set temp = l_answer %}
{%    set l_answer = r_answer %}
{%    set r_answer = temp %}
{%    set temp2 = l_rationale %}
{%    set l_rationale = r_rationale%}
{%    set r_rationale = temp2%}
{% endif %}


<div class="clear"></div>
<section id="main-content">

    {% include 'question-header.html.twig' with {'class': 'question part-3'} %}

    <section class="question">
      <div class="img-upload">
            {% include 'media.html.twig' with {'media': q['media1'], 'type': 'image'} %}
      </div>

        {% include 'form-begin.html.twig' with {'action': '/question-part4'} %}
        <div class="control-group question">
          <article class="student-rationale">
            <!--<h2>Your rationale</h2>-->
            <h2>You answered: 
            {% if q['alpha'] == 1 %}
                {{ alpha[request['answer']] }}
            {% else %}
                {{ request['answer'] }}
            {% endif %}
            </h2>
            <p>Your rationale: {{request['rationale']}}</p>
            <!--<h2>Your answer was:  request['answer'] }}</h2>-->
          </article>
          <p>4. Consider the problem again, noting the rationales below that have been provided by other students. They may, or may not, cause you to reconsider your answer. Read them, and select your final answer...</p>
        </div>
      </div>
      <div class="clear"></div>
      <div class="left standalone-rationale">
          <article>
              <h2>
                  <span>
                      Is the answer: 
                      <input type="submit" class="btn btn-primary"
                             name="C{{l_answer}}"
                        {% if q['alpha'] == 1 %}
                             value="{{alpha[l_answer]}}" 
                        {% else %}
                             value="{{l_answer}}"
                        {% endif %}
                      />
                 </span>
              </h2>

          {% for r in l_rationale %}
          <p>{{ r['rationale'] }}</p>
          {% endfor %}         
      </article>        
    </div>

      <div class="right standalone-rationale">
        <article>
              <h2>
                  <span>
                      Is the answer: 
                      <input type="submit" class="btn btn-primary"
                             name="C{{r_answer}}"
                        {% if q['alpha'] == 1 %}
                             value="{{alpha[r_answer]}}" 
                        {% else %}
                             value="{{r_answer}}"
                        {% endif %}
                      />
                 </span>
              </h2>

          {% for r in r_rationale %}
          <p>{{ r['rationale'] }}</p>
          {% endfor %}
        </article>
      </div>
      </form>
    <div class="clear"></div>
    </section>
</section>
{% include 'footer.html' %}
